﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace ASPNETMVC4Tutorial.Models
{
    public class Score
    {
        public int ID { get; set; }

        public int StudentId { get; set; }

        // Course of the score (e.g. Math, English)
        [Required]
        [DataMember(IsRequired = true)]
        [Display(Name = "Course")]
        public CourseType Course { get; set; }

        public int ScoreValue { get; set; }

        public virtual Student Student { get; set; }
    }

    public enum CourseType : int
    {
        Math=1,
        English=2,
        YuWen=3,
        Unknown = 99
    }
}
